package com.heima.crm.mapper;

import com.github.pagehelper.Page;
import com.heima.crm.pojos.dtos.*;
import com.heima.crm.pojos.entity.TbCustomer;
import com.heima.crm.pojos.vos.ChannelPageVo;
import com.heima.crm.pojos.vos.CluePageVo;
import com.heima.crm.pojos.vos.ConvertedBoardVo;
import com.heima.crm.pojos.vos.SellPageVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;

@Mapper
public interface StatisticsMapper {

    List<ConvertedBoardVo> getClueBoard(@Param("begin") Date begin, @Param("end") Date end);

    List<ConvertedBoardVo> getBusinessBoard(@Param("begin") Date begin, @Param("end") Date end);

    List<SubCountDto> getSubList(@Param("begin") LocalDate begin, @Param("begin") LocalDate end);

    Page<TbCustomer> selectByCondition(CustomerStatisticsQueryDto dto);

    Page<SellPageVo> getSellPage(SellStatisticsQueryDto dto);

    Page<CluePageVo> getCluePage(ClueStatisticsQueryDto dto);

    Page<ChannelPageVo> getChannelPage(ChannelStatisticsQueryDto dto);
}
